unit untTipoVenda;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons;

type
  TfrmTipoVenda = class(TForm)
    btnVendaSimples: TSpeedButton;
    btnVendaControlados: TSpeedButton;
    procedure btnVendaSimplesClick(Sender: TObject);
    procedure btnVendaControladosClick(Sender: TObject);
    procedure FormKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmTipoVenda: TfrmTipoVenda;

implementation

uses untVendaSimples, untVendaControlados;

{$R *.dfm}

procedure TfrmTipoVenda.btnVendaSimplesClick(Sender: TObject);
begin
  Application.CreateForm(TfrmVendaSimples, frmVendaSimples);
  frmVendaSimples.ShowModal;
  freeAndNil(frmVendaSimples);
  Close;
end;

procedure TfrmTipoVenda.btnVendaControladosClick(Sender: TObject);
begin
  Application.CreateForm(TfrmVendaControlados, frmVendaControlados);
  frmVendaControlados.ShowModal;
  freeAndNil(frmVendaControlados);
  Close;
end;

procedure TfrmTipoVenda.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if Key = Vk_Escape then Close;
end;

end.
